
<html lang="pl">
    <head>
        <meta charset ="utf-8">
        <link href="/style/css/bootstrap.css" rel="stylesheet">
        <link href ="/style/css/bootstrap-responsive.css" rel="stylesheet">
        <link href ="/style/css/moje.css" rel="stylesheet">
    </head>
    <body>
        <span class="container">
            <span class="row-fluid span12">
                <h3><?php // echo $title        ?></h1>
            </span>
            <span class="span12">

                <form class="span3 offset3 form-inline well" action="" method="post">
                           <?php // <editor-fold defaultstate="collapsed" desc="Email">?>
                    <input type="text" class="input" value="<?php echo $users->email ?>"
                           name="email" placeholder="Adres email"><br>   
                           <?php // </editor-fold> ?>
                           <?php // <editor-fold defaultstate="collapsed" desc="Username">?>
                    <input type="text" class="input" value="<?php echo $users->username ?>"
                           name="username" placeholder="Nazwa użytkownika"><br>  
                           <?php // </editor-fold> ?>
                           <?php // <editor-fold defaultstate="collapsed" desc="Name">?>
<!--                    <input type="text" class="input" value="<?php //echo $users->name ?>"
                           name="name" placeholder="Imię"><br>  -->
                           <?php // </editor-fold> ?>                   
                           <?php // <editor-fold defaultstate="collapsed" desc="Surname">?>
<!--                    <input type="text" class="input" value="<?php //echo $users->surname ?>"
                           name="surname"  placeholder="Nazwisko"><br>  -->
                           <?php // </editor-fold> ?>
                           <?php // <editor-fold defaultstate="collapsed" desc="Passwords">?>
                    <input type="password" class="input"  name="password" placeholder="Hasło"><br>
                    <input type="password" class="input" name="validation_password" placeholder="Powtórz">
                    <?php // </editor-fold> ?>
                    <button type="submit" name="register" class="btn">Zapisz</button>
                </form>  
            </span>
        </span>
    </span>
<?php 
//    $post =$this->request->post();
//    if ($post['register']&&!isset($errors['_external'])&&$act=='add')
//    {
//        $messenger->action_addMessage('Użytkownik dodany pomyślnie.');
//        HTTP::redirect("admin_user/index");
//    }
//    elseif($post['register']&&!isset($errors['_external'])&&$act=='delete')
//    {
//        $messenger->action_addMessage('Użytkownik usunięty pomyślnie.');
//        HTTP::redirect("admin_user/index");
//    }
?>
<!--    <script src="/assets/js/jquery-1.8.2.min.js"></script>
    <script src="/assets/js/bootstrap.js"></script>-->

    <script>
        $(function()
        {
            var password_message = "<?php if (isset($errors['_external']['password_confirm'])) echo $errors['_external']['password_confirm']; ?>";
            var email_message = "<?php if (isset($errors['email'])) echo $errors['email']; ?>";
           // var name_message = "<?php //if (isset($errors['name'])) echo $errors['name']; ?>";
           // var surname_message = "<?php //if (isset($errors['surname'])) echo $errors['surname']; ?>";
            var username_message = "<?php if (isset($errors['username'])) echo $errors['username']; ?>";
               if ('' != email_message) {
                   $('[name="email"]').popover({
                       template: '<div class="popover"><div class="arrow"></div><div class="popover-inner"><div class="popover-content"><p></p></div></div></div>',
                       trigger: 'manual',
                       content: email_message
                   }).popover("show");
               }
               if ('' != password_message) {
                   $('form input[type="password"]:first').popover({
                       template: '<div class="popover"><div class="arrow"></div><div class="popover-inner"><div class="popover-content"><p></p></div></div></div>',
                       trigger: 'manual',
                       content: password_message
                   }).popover("show");
               }
//               if ('' != name_message) {
//                   $('[name="name"]').popover({
//                       template: '<div class="popover"><div class="arrow"></div><div class="popover-inner"><div class="popover-content"><p></p></div></div></div>',
//                       trigger: 'manual',
//                       content: name_message
//                   }).popover("show");
//               }
//               if ('' != surname_message) {
//                   $('[name="surname"]').popover({
//                       placement: 'left',
//                       template: '<div class="popover"><div class="arrow"></div><div class="popover-inner"><div class="popover-content"><p></p></div></div></div>',
//                       trigger: 'manual',
//                       content: surname_message
//                   }).popover("show");
//               }
               if ('' != username_message) {
                   $('[name="username"]').popover({
                       placement: 'left',
                       template: '<div class="popover"><div class="arrow"></div><div class="popover-inner"><div class="popover-content"><p></p></div></div></div>',
                       trigger: 'manual',
                       content: name_message
                   }).popover("show");
               }

           });
    </script>
</body>
</html>